<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    //数组模型的解构（Array）
    //基本
    // let [a, b, c] = [1, 2, 3]
    // console.log(a);
    // console.log(b);
    // console.log(c);
    //可嵌套
    // let [a, [[b], c]] = [1, [[2], 3]];
    // console.log(a);
    // console.log(b);
    // console.log(c);

    //可忽略
    // let [a, , b] = [1, 2, 3];
    // console.log(a);
    // console.log(b);
    // a = 1
    // b = 3

    //不完全解构
    // let [a = 1, b] = []; // a = 1, b = undefined
    // console.log(a);
    // console.log(b);

    //剩余运算符
    // let [a, ...b] = [1, 2, 3];
    // console.log(a);
    // console.log(b);
    //a = 1
    //b = [2, 3]

    //
    function avg(str){
        return str.split('').reverse().join('')
        console.log(11); 
    } 
   
</script>

</html>